import {_decorator, Component, Node, Tween, director} from 'cc';

const {ccclass, property} = _decorator;

@ccclass('GameController')
export class GameController extends Component {
    start() {

    }

    update(deltaTime: number) {

    }

    gameOver() {
        // 停止所有缓动
        Tween.stopAll();
        // 显示游戏结束面板
        this.node.getChildByName("GameOver").active = true;
    }

    showMenu() {
        // 切换场景
        director.loadScene("menu");
    }
}

